package sz.com.postoffice.jxyzwgcase.pojo;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * @ClassName CustomerModel
 * @Deacription Customer对应数据库表
 * @Author jmx
 * @Date 2020/11/19 17:52
 * @Version 1.0
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class CustomerModel implements Serializable {
    private static final long serialVersionUID = -3897611568377083684L;
    public CustomerModel(Enterprise enterprise) {
        id = enterprise.getId();
        senderNo = enterprise.getCode();
        sender = enterprise.getName();
        contractName = enterprise.getContractName();
        contractExpirationTime = enterprise.getContractExpirationTime();
        customerMaintainerName = enterprise.getCustomerMaintainerName();
        customerMaintainerNo = enterprise.getCustomerMaintainerNo();
        contractExpirationTime = enterprise.getContractExpirationTime();
        senderAddr = enterprise.getAddress();
        postOrgName = enterprise.getDistrictName();
        postOrgNo = enterprise.getDistrictCode();
        keyMarketCode = enterprise.getKeyMarketCode();
        keyMarketName = enterprise.getKeyMarketName();
        locationLongitude = enterprise.getLongitude();
        locationLatitude = enterprise.getLatitude();
        createUser = enterprise.getCreateUser();
        modifyUser = enterprise.getModifyUser();
        empPosition = enterprise.getEmpPosition();
        customerEmail = enterprise.getCustomerEmail();
    }
    public CustomerModel(String name) {
        sender = name;
    }
    private Integer id;
    @ApiModelProperty("寄件客户编号")
    private String senderId;
    @ApiModelProperty("寄件客户代码(大宗客户代码)")
    private String senderNo;
    @ApiModelProperty("寄件客户名称")
    private String sender;
    @ApiModelProperty("合同名")
    private String contractName;
    @ApiModelProperty("合同到期时间")
    private Date contractExpirationTime;
    @ApiModelProperty("寄件客户分仓编号")
    private String senderWarehouseId;
    @ApiModelProperty("寄件客户分仓名称")
    private String senderWarehouseName;
    @ApiModelProperty("寄件客户地址")
    private String senderAddr;
    @ApiModelProperty("重点市场code")
    private String keyMarketCode;
    @ApiModelProperty("重点市场名称")
    private String keyMarketName;
    @ApiModelProperty("客户维护人姓名")
    private String customerMaintainerName;
    @ApiModelProperty("客户维护人工号")
    private String customerMaintainerNo;
    @ApiModelProperty("职位")
    private String empPosition;
    @ApiModelProperty("客户邮箱")
    private String customerEmail;
    @ApiModelProperty("寄件联系人")
    private String senderLinker;
    @ApiModelProperty("寄件客户电话")
    private String senderFixtel;
    @ApiModelProperty("寄件客户手机")
    private String senderMobile;
    @ApiModelProperty("所属营业部code")
    private String postOrgNo;
    @ApiModelProperty("所属营业部名称")
    private String postOrgName;
    @ApiModelProperty("经度")
    private String locationLongitude;
    @ApiModelProperty("纬度")
    private String locationLatitude;
    @ApiModelProperty("最后一次寄件时间")
    private Date lastSenderDate;
    @ApiModelProperty("创建时间")
    private Date createDate;

    @ApiModelProperty("创建用户数")
    private String createUser;

    @ApiModelProperty("修改时间")
    private Date modifyDate;

    @ApiModelProperty("修改用户")
    private String modifyUser;

}
